@import '../global.less';

.el-date-editor {
  .el-input__suffix-inner {
    .el-input__icon {
      line-height: 32px;
      font-size: 16px;

      &:before {
        content: '\e63c';
      }
    }
  }
}

.el-date-picker {
  width: 320px;
  margin: 5px 0;
  line-height: 30px;
  color: #5a5e66;
  background-color: #fff;
  border: 1px solid @border-color;
  border-radius: @radius;
  box-shadow: 0 1px 10px 0 rgba(0,0,0,.1);

  table {
    width: 100%;
    font-size: 12px;
    table-layout: fixed;

    td {
      color: @label-color;

      &:hover,
      a:hover {
        color: @base-color;
      }
    }
  }
}

.el-date-picker__header {
  margin: 12px;
  text-align: center;

  button {
    padding: 5px;
    vertical-align: middle;
    background-color: #fff;
    border-color: #fff;
  }

  .el-picker-panel__icon-btn {
    font-size: 12px;
    color: @font-color;
  }

  .el-date-picker__prev-btn {
    float: left;
  }

  .el-date-picker__next-btn {
    float: right;
  }

  span {
    cursor: pointer;
  }
}

.el-picker-panel__content {
  position: relative;
  margin: 15px;
}

.el-date-table {
  th {
    border-bottom: 1px solid @border-color;
  }

  td {
    position: relative;
    width: 32px;
    height: 30px;
    padding: 4px 0;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;

    div {
      height: 30px;
    }

    span {
      position: absolute;
      left: 50%;
      display: block;
      width: 24px;
      height: 24px;
      margin: 0 auto;
      line-height: 24px;
      border-radius: 50%;
      transform: translateX(-50%);
    }
  }

  .next-month,
  .prev-month {
    color: @disable-color;
  }

  .today {
    span {
      color: @base-color;
    }
  }

  .current {
    span {
      color: #fff;
      background-color: @base-color;
    }
  }
}

.el-month-table,
.el-year-table {
  td {
    padding: 20px 3px;
    text-align: center;
    cursor: pointer;

    a {
      color: @label-color;
    }

    .current，.today {
      a {
        color: @base-color;
      }

    }
  }
}

.el-date-picker__time-header {
  position: relative;
  display: table;
  width: 100%;
  padding: 8px 5px 5px;
  font-size: 12px;
  border-bottom: 1px solid @border-color;
  box-sizing: border-box;
}

.el-date-picker__editor-wrap {
  position: relative;
  display: table-cell;
  padding: 0 5px;
}

.el-picker-panel__footer {
  position: relative;
  padding: 4px;
  text-align: right;
  border-top: 1px solid @border-color;
  background-color: #fff;

  button:first-child {
    color: @font-color;
    background-color: #fff;
    border-color: #fff;
  }
}

.el-time-panel {
  position: absolute;
  width: 180px;
  left: 0;
  z-index: 1000;
  margin: 5px 0;
  user-select: none;
  border: 1px solid #dfe4ed;
  background-color: #fff;
  box-shadow: 0 1px 10px 0 rgba(0,0,0,.1);
  border-radius: @radius/2;
}

.el-time-spinner {
  width: 100%;
  white-space: nowrap;

  &.has-seconds {
    .el-time-spinner__wrapper {
      width: 33.3%;
    }
  }

  .el-time-spinner__list {
    padding: 0;
    text-align: center;

    &:after,
    &:before {
      content: '';
      display: block;
      width: 100%;
      height: 80px;
    }

    li {
      height: 32px;
      line-height: 32px;
      font-size: 12px;

      &:hover {
        background-color: @bg-color;
      }
    }

    .active {
      font-weight: 700;
    }
  }
}

.el-time-panel__content {
  &:after,
  &:before {
    content: '';
    position: absolute;
    top: 50%;
    z-index: -1;
    left: 0;
    right: 0;
    height: 32px;
    padding-top: 6px;
    margin-top: -15px;
    text-align: left;
    border-top: 1px solid @border-color;
    border-bottom: 1px solid @border-color;
    box-sizing: border-box;
  }

  &:before {
    padding-left: 50%;
    margin-top: -25px;
    margin-right: 8%;
    margin-left: 8%;
  }

  &:after {
    left: 50%;
    margin-top: -25px;
    margin-left: 8%;
    margin-right: 8%;
  }
}

.el-time-panel__footer {
  padding: 4px;
  height: 36px;
  line-height: 25px;
  text-align: right;
  border-top: 1px solid @border-color;
  box-sizing: border-box;

  button {
    padding: 0 5px;
    margin: 0 5px;
    line-height: 28px;
    cursor: pointer;
    outline: none;
    font-size: 12px;
    color: @label-color;
    border: none;
    background-color: transparent;
  }

  .confirm {
    color: @base-color;
  }
}

.el-time-spinner__wrapper {
  position: relative;
  display: inline-block;
  width: 50%;
  max-height: 190px;
  overflow: hidden;
  vertical-align: top;
}
